
package com.example.dao;

import com.example.entity.Users;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

@CacheConfig(cacheNames = "baseCache")
public interface UserDao extends JpaRepository<Users, Integer>  {

    @Cacheable
    Users findByName(String name);
}

